#include "fact.h"
#include <iostream>

// 定义
int fact(int val) {
    std::cout << "fact: " << val << std::endl;
    int ret = 1;
    while (val > 1) {
        ret *= val--;
    }
    return ret;
}